In the Internet of Things (IoT), each device (for example, a sensor) has its own unique identification (for example, device identifier (ID), such as 0001, 0002, etc.) that distinguishes itself from other devices. As illustrated in FIG. 1, these unique identifications may be stored in a device profile in association with other dimension information of the device (for example, Location, Device Type, Owner, and Others). Those skilled in the art would appreciate that the device profile can be a table stored in a database.
It may be seen from FIG. 1 that each piece of dimension information may include at least one attribute. For example, “Location” dimension information of a device 0001 includes “Beijing,” “Haidian,” “Shangdi,” “Dia (Diamond, name of a building),” “2F” and “206 (room).”
In order to implement a plurality of demands, an application executed in the IOT may require searching a certain device in the IOT. Generally, this search is implemented by querying a device unique identification stored in the device profile based on some device profile conditions.
It is known that a LIKE keyword in a structured query language (SQL) statement may be used to implement the query. For example, in order to search all family blood pressure meters, the SQL statement may be:
SELECT DeviceID (1)
FROM table Device_profile as t (2)
WHERE t.DeviceType LIKE “% BloodPressure:Family %” (3)